import request from '@/utils/request'
const api_name = '/edu/course'
export default {
    saveCourseInfo(courseInfo) {
        return request({
            url: `${api_name}/save-course-info`,
            method: 'post',
            data: courseInfo
        })
    },
    getCourseInfoFormById(id) {
        return request({
            url: `${api_name}/${id}`,
            method: 'get',
        })
    },
    updateCourseInfo(courseInfo) {
        return request({
            url: `${api_name}`,
            method: 'put',
            data: courseInfo
        })
    },
    pageQuery(current, size, courseQuery) {
        return request({
            url: `${api_name}/${current}/${size}`,
            method: 'post',
            data: courseQuery
        })
    },
    delCourseById(id) {
        return request({
            url: `${api_name}/${id}`,
            method: 'delete',

        })
    },
    getCourseDtoById(id) {
        return request({
            url: `${api_name}/dto/${id}`,
            method: 'get',

        })
    },
    coursePublishById(id) {
        return request({
            url: `${api_name}/publish/${id}`,
            method: 'put',

        })
    },


}